<template>
  <view class="home-doInfo">
    <view class="home-doInfo-content">
      <view v-for=" (item,index) in doInfoList" :key="index" class="doCommon">
        <view class="borderBg">
          <view :class="`number ${isIos() && 'ios-number'}`">{{ item.total }}</view>
          <view class="doName">
            {{ item.name }}
          </view>
        </view>
      </view>
    </view>

    <view class="home-doInfo-unit">{{ unit }}</view>
  </view>
</template>

<script type="text/ecmascript-6">
import { envirCurr } from '@/utils/utils';
export default {
  props: {
    doInfoList: {
      type: Array,
      default: () => []
    },

    unit: {
      type: String,
      default: ''
    }
  },
  methods: {

    isIos() {
      return envirCurr() === 'ios';
    }
  }
};
</script>

<style lang="less" scoped>
.home-doInfo {
    width: 100%;
    height: 110px;
    background: #FFFFFF;
    -webkit-border-radius: 8px;
    border-radius: 8px;
    position: relative;
    top: 10px;
    z-index: 10;

    box-shadow: 0px 10px 16px 0px rgba(64,127,255,0.08);
    .home-doInfo-content {
      display: flex;
      height: 100%;
    }

    .doCommon {
        width: 100%;
        height: 100%;

        .borderBg {
            flex: 1;
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
            font-family: DINCondensed, DINCondensed-Bold;

            .number {
                font-size: 18px;
                font-weight: 700;
                color: #303133;
            }

            .ios-number {
              font-size: 24px;
            }

            .doName {
                margin-top: 10px;
                font-size: 15px;
                font-weight: 500;
                color: #909399;
            }
        }
    }

    .home-doInfo-unit {
      position: absolute;
      z-index: 10;
      right: 6px;
      bottom: 6px;
      color: #909399;
      font-size: 12px;
    }
}
</style>
